<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试http</title>
    <script src="../dist/jtutil.min.js"></script>
</head>
<body>
    
    <button id="btn">发送get请求</button>

    <script>
        const btn = document.querySelector("#btn");
        // console.log(window);
        console.log(jtutil);

        jtutil.http.init({
            url: 'http://localhost:8888/',
            timeout: 20000,
            withCredentials: false,
        });


        btn.addEventListener('click',()=>{

            jtutil.http.Get('/get').then(res=>{
                console.log(res);
            });
        })

    </script>

</body>
</html>